package com.yunkuhui.www.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.logging.LogManager;

@RestController
public class LogController {

	@RequestMapping("/log")
	public String logback() {
		Logger logger = LoggerFactory.getLogger(LogController.class);
		logger.info("aaaaaaaaaaaaaaaaaaaaaaaa");
		logger.debug("bbbbbbbbbbbbbbbbbbbbb");
		logger.warn("ccccccccccccccccccccccc");
		logger.error("ddddddddddddddddddddddddddd");
		return "LoggerFactory";
	}

	@RequestMapping("/log1")
	public String logback1() {
		java.util.logging.Logger logger = LogManager.getLogManager().getLogger("com.yunkuhui");
		logger.info("info");
		logger.warning("warn");
		return "LogManager";
	}
}
